3.1.38 \(\int \frac {1}{1-\cosh ^2(x)} \, dx\) [38]

Optimal. Leaf size=2 \[ \coth (x) \]

[Out]

coth(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 2, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3254, 3852, 8} \begin {gather*} \coth (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - Cosh[x]^2)^(-1),x]

[Out]

Coth[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {1}{1-\cosh ^2(x)} \, dx &=-\int \text {csch}^2(x) \, dx\\ &=i \text {Subst}(\int 1 \, dx,x,-i \coth (x))\\ &=\coth (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 2, normalized size = 1.00 \begin {gather*} \coth (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - Cosh[x]^2)^(-1),x]

[Out]

Coth[x]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(15\) vs. \(2(2)=4\).
time = 0.45, size = 16, normalized size = 8.00

method result size
risch \(\frac {2}{{\mathrm e}^{2 x}-1}\) \(11\)
default \(\frac {\tanh \left (\frac {x}{2}\right )}{2}+\frac {1}{2 \tanh \left (\frac {x}{2}\right )}\) \(16\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1-cosh(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/2*tanh(1/2*x)+1/2/tanh(1/2*x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 10 vs. \(2 (2) = 4\).
time = 0.26, size = 10, normalized size = 5.00 \begin {gather*} -\frac {2}{e^{\left (-2 \, x\right )} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cosh(x)^2),x, algorithm="maxima")

[Out]

-2/(e^(-2*x) - 1)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 20 vs. \(2 (2) = 4\).
time = 0.36, size = 20, normalized size = 10.00 \begin {gather*} \frac {2}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cosh(x)^2),x, algorithm="fricas")

[Out]

2/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 - 1)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 14 vs. \(2 (2) = 4\).
time = 0.21, size = 14, normalized size = 7.00 \begin {gather*} \frac {\tanh {\left (\frac {x}{2} \right )}}{2} + \frac {1}{2 \tanh {\left (\frac {x}{2} \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cosh(x)**2),x)

[Out]

tanh(x/2)/2 + 1/(2*tanh(x/2))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 10 vs. \(2 (2) = 4\).
time = 0.40, size = 10, normalized size = 5.00 \begin {gather*} \frac {2}{e^{\left (2 \, x\right )} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cosh(x)^2),x, algorithm="giac")

[Out]

2/(e^(2*x) - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 10, normalized size = 5.00 \begin {gather*} \frac {2}{{\mathrm {e}}^{2\,x}-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(cosh(x)^2 - 1),x)

[Out]

2/(exp(2*x) - 1)

________________________________________________________________________________________